Skip to content

Fix multiple jscompiler errors#26632

Open
stephenduong1004 wants to merge 3 commits intoemscripten-core:mainfrom
stephenduong1004:patch-7
Open

Fix multiple jscompiler errors#26632
stephenduong1004 wants to merge 3 commits intoemscripten-core:mainfrom
stephenduong1004:patch-7

Conversation

@stephenduong1004
Copy link
Copy Markdown
Collaborator

@stephenduong1004 stephenduong1004 commented Apr 6, 2026

Fix the following errors after #26424:

- ERROR - [JSC_BAD_JSDOC_ANNOTATION] Parse error. illegal use of unknown JSDoc tag "noreturn"; ignoring it. Place another character before the @ to stop JSCompiler from parsing it as an annotation.
- ERROR - [JSC_USED_GLOBAL_THIS] dangerous use of the global this object.

src/preamble.js Outdated
#if ASSERTIONS && !('$FS' in addedLibraryItems)
// show errors on likely calls to FS when it was not included
var FS = {
/** @return {*} */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does @return {undefined} work here?

src/preamble.js Outdated
mkdev() { FS.error() },
createLazyFile() { return (/** @type {?} */ (FS.error())); },
open() { return (/** @type {?} */ (FS.error())); },
mkdev() { return (/** @type {?} */ (FS.error())); },
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why the JS compiler if reporting Missing return statement here? Why is it expecting this method to return anything at all?

@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented Apr 7, 2026

Does #26641 fix the FS errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants